const loginModel = require("../models/login_model")
const Result = require("../beans/result")

function doStudentLogin(value,msg,callback) {
    
    loginModel.getStudentItem(value, (err, data) => {
        if (err) {
            callback(new Result(err, null, msg[0], 401))
        } else {
            callback(new Result(null, data, msg[1], 200))
        }
    })
}

module.exports = {
    doStudentLogin,
}